package com.river.backend.admin;

import com.river.backend.core.base.controller.BaseController;
import com.river.backend.core.base.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by huanghe on 2017/9/25.
 */
@RestController
public class Test extends BaseController {

    @Autowired
    DiscoveryClient discoveryClient;

    @GetMapping("/dca")
    public String dc() {
        String services = DateUtil.getYear() + "Servicesaaa:" + discoveryClient.getServices();
        System.out.println(services);

        return services;
    }
}
